package gdut.stream.middle;

import java.util.Arrays;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Stream;

public class MapLamda {
    public static void main(String[] args) {
        Integer[] arr = {1, 2, 3, 4, 5};
//        map操作可以对流中的元素进行计算或者转换类型
        Stream<Integer> integerStream = Arrays.stream(arr);
        integerStream
                .map(integer -> integer + 100)
                .map(integer -> integer.toString() + "变成字符串")
                .forEach(s -> System.out.println(s));
    }
}
